function _finally(callback) {
    let P = this.constructor;
    return this.then((value) => P.resolve(callback()).then(() => value), (reason) => P.resolve(callback()).then(() => { throw reason; }));
}
;
if (!Promise.prototype.finally) {
    Promise.prototype.finally = _finally;
}
export default _finally;
